<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>拓展运算符</title>
</head>
<body>
    <div></div>
    <script>
        //1、数组合并
        const Arr1 = [1,2,3];
        const Arr2 = [4,5,6];

        //es5
        const Arr3 = Arr1.concat(Arr2)
        //es6
        const Arr4 = [...Arr1,...Arr2]

        console.log(Arr3,Arr4)
        
        //2、数组克隆
        const Arr5 = [7,8,9];
        const ArrCopy = [...Arr5];
        console.log(ArrCopy);
    </script>
</body>
</html>